<?php

require FCPATH . '/application/controllers/frontend.php';

class Client extends Frontend {

    public function __construct() {
	parent::__construct();
    }
    
    public function records(){
	$this->load->model('client_model');
	$lang = $this->get_language();
	$market = intval($this->input->get('market'));
	$city = intval($this->input->get('city'));
	
	$columns = array(
	    array('name_'.$lang,'name'),
	    array('content_'.$lang, 'content')
	);
	
	$conditions = array(
	    array('where','market',$market),
	    array('where','city',$city)
	);
	
	$this->json_back('XT001','',$this->client_model->records($columns,$conditions));
    }
}